﻿<%@ Page Title="" Language="C#" MasterPageFile="~/skin.Master" AutoEventWireup="true" CodeBehind="forecasterrank.aspx.cs" Inherits="DataShow.rank.forecasterrank" %>

<asp:Content ID="headers" ContentPlaceHolderID="home_header" runat="server">
    <link rel="stylesheet" href="/css/compiled/form-showcase.css" type="text/css" media="screen" />
    <link href="/css/lib/bootstrap.datepicker.css" type="text/css" rel="stylesheet" />
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="cph_home" runat="server">
    <div style="margin-top: 10px;">
        <ul class="breadcrumb">
            <li><a href="/Index.aspx">首页</a> <span class="divider">/</span></li>
            <li class="active">预报员排名</li>
        </ul>
    </div>
    <div class="row-fluid" id="tip" style="display:none">
        <div class="span12">
            <div class='alert alert-info'><i class='icon-search'></i>正在查找，请稍后~~</div>
        </div>
    </div>
    <div class="row-fluid">
        <div class="span12">
            <div class="widget-box">
                <div class="widget-title">
                    <span class="icon">
                        <i class="icon-plus"></i>
                    </span>
                    <h5>功能栏</h5>
                </div>
                <div class="widget-content nopadding">
                    年份
                    <asp:DropDownList runat="server" ID="ddl_year" ClientIDMode="Static">

                    </asp:DropDownList>
                    月份
                    <asp:DropDownList runat="server" ID="ddl_month" ClientIDMode="Static">
                        <asp:ListItem Text="1月" Value="1" />
                        <asp:ListItem Text="2月" Value="2" />
                        <asp:ListItem Text="3月" Value="3" />
                        <asp:ListItem Text="4月" Value="4" />
                        <asp:ListItem Text="5月" Value="5" />
                        <asp:ListItem Text="6月" Value="6" />
                        <asp:ListItem Text="7月" Value="7" />
                        <asp:ListItem Text="8月" Value="8" />
                        <asp:ListItem Text="9月" Value="9" />
                        <asp:ListItem Text="10月" Value="10" />
                        <asp:ListItem Text="11月" Value="11" />
                        <asp:ListItem Text="12月" Value="12" />
                    </asp:DropDownList>
                    <input type="button" id="btn_search" class="btn-primary btn" value="搜索" />
                    <input type="button" class="btn btn-link" value="高级搜索" id="gaoji" />
                </div>
            </div>
        </div>

    </div>
    <div class="row-fluid">
        <div class="span12">
            <div class="widget-box" style="margin-top: 0">
                <div class="widget-title">
                    <span class="icon">
                        <i class="icon-plus"></i>
                    </span>
                    <h5>搜索结果</h5>
                </div>
                <div class="widget-content nopadding">
                    <table class="table table-hover">
                        <tr>
                            <th>预报员</th>
                            <th>排名</th>
                            <th>48H晴雨</th>
                            <th>48H一般性降水</th>
                            <th>48HTMax2C</th>
                            <th>48HTMin2C</th>
                            <th>48H晴雨</th>
                            <th>48HT一般性降水</th>
                            <th>48HTMax2C</th>
                            <th>48HTMin2C</th>
                            <th>综合分</th>
                            <th>样本数</th>
                            <th>达标次数</th>
                        </tr>
                        <tbody id="mainTable"></tbody>
                    </table>
                </div>
            </div>
        </div>

    </div>

</asp:Content>
<asp:Content runat="server" ID="scripts" ContentPlaceHolderID="home_script">
    <script src="/js/bootstrap.datepicker.js"></script>
    <script src="../js/rank.js"></script>
    <script type="text/javascript">

        $("#gaoji").click(function () {
            location.href = 'rankadvanced.aspx';
        })

        

        $(function () {

            // datepicker plugin
            $('.datepicker').datepicker().on('changeDate', function (ev) {
                $(this).datepicker('hide');
            });

            //搜索
            $("#btn_search").click(function () {
                var year = $("#ddl_year option:selected").val();
                var month = $("#ddl_month option:selected").val();
                $("#mainTable").empty();
                $("#tip").show();
                $.ajax({
                    type: "GET",
                    url: "Handler.ashx",
                    data: { year: year, month: month },
                    success: function (data) {
                        $("#tip").hide();
                        var json = JSON.parse(data);
                        if (json.success == "True") {
                            var res = JSON.parse(data);
                            FillTable(res);
                        }
                        else {
                            alert(json.msg)
                        }
                    }
                })
            })

        });
    </script>
</asp:Content>
